﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using TCCHWLib.Commands;
using System.Collections;
using TCCHWLib;
using TCCSWLib;

namespace TCCCompiler
{
    public partial class CompilerForm : Form
    {
        List<ICommand> commands = new List<ICommand>();
        public CompilerForm()
        {
            InitializeComponent();

            RunTestCase_0();        // atomic
            RunTestCase_1();        // if-else
        }

        private void RunTestCase_0()
        {
            string test_case_2 = @"int[] arr = new int[2];
arr[0] = 11;

atomic
{
    int[] a = new int[3];
    a[0] = 22;
    a[1] = 33;
    a[2] = 44 + 55;
}

atomic
{
    arr[0] = 66;
    arr[1] = 77;
}
";
            //rtbCode.Text = testCase_0;
            richTextBox_SourceCode.Text = test_case_2;
        }
        private void RunTestCase_1()
        {
            string testCase_1 = @"int k = 0;";

            richTextBox_SourceData.Text = testCase_1;
        }

        private void btn_Complie_Click(object sender, EventArgs e)
        {
            Compiler c = new Compiler();
            //c.Compile(richTextBox_SourceData, richTextBox_SourceCode, treeView1, treeView2, richTextBox_ErrorList);
        }

    }
}